package OperationSystem.day1203blocking_queue_阻塞队列.Timer;

import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.TimeUnit;

public class Main {
    private static class Task extends TimerTask{
        @Override
        public void run() {
            System.out.println("10s到了");
        }
    }

    public static void main(String[] args) {
        Timer timer=new Timer();
        timer.schedule(new Task(),10*1000);

        while (true){
            System.out.println("正在做自己的事情");
        }
    }
}
